<%@page import="com.mmy.domain.plane.TPlanePlan"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="/WEB-INF/jsp/includeb.jsp"></jsp:include>
<script type="text/javascript" src="js/jsp/back/planebase/planePlanIndex.js"></script>
<title>航班时刻信息</title>
<script>
$(function () {

laydate.render({
  elem: '#planStartDate',
  type: 'datetime' ,
  theme: '#1eab3c',
  value: '${strStartDate}'
	});
laydate.render({
  elem: '#planEndDate',
  type: 'datetime' ,
  theme: '#1eab3c',
  value: '${strEndDate}'
	});
	
});
</script>
</head>
<body>
	<div id="off-canvas-container" class="off-canvas-container">
		<jsp:include page="/WEB-INF/jsp/BackHeader.jsp"></jsp:include>
		<div id="menu-back">
			<main class="at-padding-large-bottom">
			<article>		
	<header class="bg-light at-padding-large-top at-padding-large-bottom at-margin-large-bottom">
	<div class="page-header container">
						<div class="row">
							<div class="span-5 col">
								<h1><label>航班时刻信息管理</label></h1>
							</div>	
							
						 </div >
					</div>
	</header>
	<section class="container">
	<nav class="breadcrumb" >
						
	<a href="backplaneorgindex" >航空公司</a> | 
				<a href="backplaneairportindex" >机场信息</a> | 
				 <a href="backplanebaseindex" >航班信息</a>
						<hr class="breadcrumb-hr" color=#F9F6E5 SIZE=3></hr>
	</nav>
<div class="information">
			<h4 class="info-h4">
							<i class="fa fa-caret-right" aria-hidden="true" ></i>修改航班时刻信息
						</h4>
				
						
				<div  class="input-container">
				<form action="backsaveupdateplaneplan" method="post" class="info-form" name="planePlanForm" onSubmit="return planPlaneSubmit(this);" >
				
				<table class="info-table" >
				<tr>
					<th><label for="planStandard">标准</label> <span class="mustWrite">*</span></th>
					<td>
					<input type="hidden" name="PlanID" id="planID" maxlength="64" readonly="readonly" value="${dbPlanePlan.getPlanID() }"/>
						<input type="text" id="planStandard" name="Standard" maxlength="64" value="${dbPlanePlan.getStandard() }" required/>
					</td>
					<th><label for="planeName">航班名称</label></th>
					<td>
					<input type="hidden" name="PlaneID" id="planeID" maxlength="64" readonly="readonly" value="${dbPlanePlan.getPlaneID() }"/>
					<input type="text" name="PlaneName" id="planeName" maxlength="64" readonly="readonly" value="${dbPlanePlan.getPlaneName()}"/>
						
					</td>
				</tr>
				<tr>
				<th><label for="planZoneID">出发地</label><span class="mustWrite">*</span></th>
			<c:choose>
					<c:when test="${dbPlanePlan.getZoneOutID()<900000 }">
					<td>
							<select class="input-select-vlign " id="planZoneID" name="Province" emptyOption="false"  onchange="changeSelect(this,'getLevel4','level3','City')"  required>
					
					<c:forEach var="lstZoneProvince" items="${lstZoneProvince}">
						<option value="${lstZoneProvince.getZoneID()}" <c:if test="${strProvinceID==lstZoneProvince.getZoneID()}"> selected="selected"</c:if>>${lstZoneProvince.getZoneName()}</option>
						</c:forEach>
						</select>
						<select class='input-select-vlign  City' name="ZoneOutID" id="planZoneOutID"  emptyOption="false"   required onchange="appearAirPort(this.value)">
					<c:forEach var="lstZoneCity" items="${lstZoneCityOut}">
						<option value="${lstZoneCity.getZoneID()}" <c:if test="${dbPlanePlan.getZoneOutID()==lstZoneCity.getZoneID()}"> selected="selected"</c:if>>${lstZoneCity.getZoneName()}</option>
						</c:forEach>
						</select> 	
					</td>
				</c:when>
					<c:otherwise>
					<td>
							<select class="input-select-vlign " id="planZoneID" name="Continent" emptyOption="false"  onchange="changeSelect(this,'getLevel2','level1','Country')"  required>
				
					<c:forEach var="lstZoneContinent" items="${lstZoneContinent}">
						<option value="${lstZoneContinent.getZoneID()}" <c:if test="${strContinentID==lstZoneContinent.getZoneID()}"> selected="selected"</c:if>>${lstZoneContinent.getZoneName()}</option>
						</c:forEach>
						</select>
						<select class='input-select-vlign  Country' name="ZoneOutID" id="planZoneOutID"  emptyOption="false"   required onchange="appearAirPort(this.value)">
					<c:forEach var="lstZoneCountry" items="${lstZoneCountryOut}">
						<option value="${lstZoneCountry.getZoneID()}" <c:if test="${dbPlanePlan.getZoneOutID()==lstZoneCountry.getZoneID()}"> selected="selected"</c:if>>${lstZoneCountry.getZoneName()}</option>
						</c:forEach>
						</select>
							
					</td>
				</c:otherwise>
			</c:choose>
				<th><label for="planAirportOut">出发机场</label><span class="mustWrite">*</span></th>
				<td>
				<select class="input-select-vlign" name="AirportOutID"  id="planAirportOut"  required >
						<option value="">---请选择---</option>
						<c:forEach var="lstPlaneAirport" items="${lstPlaneAirport}">
						<option value="${lstPlaneAirport.getAirportID()}" <c:if test="${dbPlanePlan.getAirportOutID()==lstPlaneAirport.getAirportID()}"> selected="selected"</c:if>>${lstPlaneAirport.getAirportName()}</option>
						</c:forEach>
						</select> </td>
				</tr>
				<tr>
				<th><label for="planInZoneID">到达地</label><span class="mustWrite">*</span></th>
		<c:choose>
					<c:when test="${dbPlanePlan.getZoneInID()<900000 }">
					<td>
							<select class="input-select-vlign " id="planInZoneID" name="Province" emptyOption="false"  onchange="changeSelect(this,'getLevel4','level3','City')"  required>
					
					<c:forEach var="lstZoneProvince" items="${lstZoneProvince}">
						<option value="${lstZoneProvince.getZoneID()}" <c:if test="${strProvinceInID==lstZoneProvince.getZoneID()}"> selected="selected"</c:if>>${lstZoneProvince.getZoneName()}</option>
						</c:forEach>
						</select>
						<select class='input-select-vlign  City' name="ZoneInID" id="planZoneInID"  emptyOption="false"   required onchange="appearInAirPort(this.value)">
					<c:forEach var="lstZoneCity" items="${lstZoneCityIn}">
						<option value="${lstZoneCity.getZoneID()}" <c:if test="${dbPlanePlan.getZoneInID()==lstZoneCity.getZoneID()}"> selected="selected"</c:if>>${lstZoneCity.getZoneName()}</option>
						</c:forEach>
						</select> 	
					</td>
				</c:when>
					<c:otherwise>
					<td>
							<select class="input-select-vlign " id="planInZoneID" name="Continent" emptyOption="false"  onchange="changeSelect(this,'getLevel2','level1','Country')"  required>
				
					<c:forEach var="lstZoneContinent" items="${lstZoneContinent}">
						<option value="${lstZoneContinent.getZoneID()}" <c:if test="${strContinentInID==lstZoneContinent.getZoneID()}"> selected="selected"</c:if>>${lstZoneContinent.getZoneName()}</option>
						</c:forEach>
						</select>
						<select class='input-select-vlign  Country' name="ZoneInID" id="planZoneInID"  emptyOption="false"   required onchange="appearInAirPort(this.value)">
					<c:forEach var="lstZoneCountry" items="${lstZoneCountryIn}">
						<option value="${lstZoneCountry.getZoneID()}" <c:if test="${dbPlanePlan.getZoneInID()==lstZoneCountry.getZoneID()}"> selected="selected"</c:if>>${lstZoneCountry.getZoneName()}</option>
						</c:forEach>
						</select>
							
					</td>
				</c:otherwise>
			</c:choose>
				<th><label for="planAirportIn">达到机场</label><span class="mustWrite">*</span></th>
				<td>
				<select class="input-select-vlign" name="AirportInID"  id="planAirportIn"  required >
						<option value="">---请选择---</option>
						<c:forEach var="lstPlaneAirport" items="${lstPlaneAirportIn}">
						<option value="${lstPlaneAirport.getAirportID()}" <c:if test="${dbPlanePlan.getAirportInID()==lstPlaneAirport.getAirportID()}"> selected="selected"</c:if>>${lstPlaneAirport.getAirportName()}</option>
						</c:forEach>
						</select> </td>
				</tr>
				<tr>
					<th><label for="planStartDate">出发时间</label><span class="mustWrite">*</span></th>
					<td>
						<input type="text" name="planStartDate" id="planStartDate"  required />
											</td>
					<th><label for="planEndDate">到达时间</label><span class="mustWrite">*</span></th>
					<td>
					<input type="text" name="planEndDate" id="planEndDate"  required />

					</td>
				</tr>
				
				<tr>
					<th><label for="planFloor">底价</label><span class="mustWrite">*</span></th>
					<td>
						<input type="number" step="0.01"  name="Floor" id="planFloor" maxlength="18" value="${dbPlanePlan.getFloor() }" required/>
					</td>
					<th><label for="planPeer">同业价</label><span class="mustWrite">*</span></th>
					<td>
						<input type="number"  step="0.01" name="Peer" id="planPeer" maxlength="18" value="${dbPlanePlan.getPeer() }"  required/>
					</td>
				</tr>
				<tr>
					<th><label for="planPrice">对外报价</label><span class="mustWrite">*</span></th>
					<td>
						<input type="number" step="0.01" name="Price" id="planPrice" maxlength="18" value="${dbPlanePlan.getPrice() }" required/>
					</td>
					<th><label for="planNum">数量</label><span class="mustWrite">*</span></th>
					<td>
					<input type="number"  name="Number" id="planNum" maxlength="18" value="${dbPlanePlan.getNumber() }" required/>
					</td>
				</tr>
				<tr>
					<th><label for="planMemo">备注</label></th>
					<td colspan="3">
						<textarea name="Memo" id="planMemo" maxlength="256"  >${dbPlanePlan.getMemo() }</textarea>
					</td>
				</tr>	
					
				</table>
				<center>
				<input type="submit" class="btn" value="保存" />
				<input type="button" class="btn" value="返回" onclick="rehidder()"/>
				</center> 
				</form>
				
							
							
				</div>
							</div>
			</section>
			</article>
			</main>
			</div>
		<jsp:include page="/WEB-INF/jsp/Footer.jsp"></jsp:include>
		</div>
		<jsp:include page="/WEB-INF/jsp/include2.jsp"></jsp:include>
</body>
</html>